package com.project.controller;

import com.project.bean.DeptBean;
import com.project.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lyl
 * description:部门控制类
 */
@RestController //使用ajax发送信息，暂时不跳转页面
@RequestMapping("dept")
public class DeptController {
    @Autowired
    private IDeptService iDeptService;

    /**
     * 查询所有部门
     *
     * @return
     */
    @RequestMapping("findAll")
    public List<DeptBean> findAll() {
        return iDeptService.findAll();
    }

}
